<template>
	<view class="content">
		<view class="box"></view>
		<!-- 上办部分 -->
		<view class="content-top">
			<!-- 头像 -->
			<view class="content-top-avatar" v-if="userInfo.headIcon">
				<image src="../../static/imgs/face/2jpg.jpg" mode="aspectFill"></image>
			</view>
			<view class="content-top-avatar" v-else>
				<image src="../../static/imgs/face/2jpg.jpg" mode="aspectFill"></image>
			</view>
			<!-- 认证 -->
			<view class="content-top-phone">
				<text class="content-top-phone-top" v-if='userInfo.nickName'>182****7949</text>
				<text class="content-top-phone-top" v-else>182****7949</text>
				<text class="content-top-phone-bottom">中国移动提供认证服务</text>
			</view>
			<!--登录 -->
			<view class="bth">
				<text>登录</text>
			</view>
			<!-- 切换账号 -->
			<view class="handoff"> <text>切换账号</text> </view>
		</view>
		<!-- 下半部分 -->
		<view class="content-bottom">
			<!-- 其他方式登录 -->
			<view class="other" @click="goLogin"> <text>通过其他方式登录</text> </view>
			<!-- 协议 -->
			<view class="agreement">
				<view class="agreement-check">
					<u-checkbox-group><u-checkbox> </u-checkbox> </u-checkbox-group>
				</view>
				<view class="agreement-text">
					<text class="ty">登录即代表同意</text>
					<text class="zg">中国移动认证服务条款 </text>
					<text class="and">和</text>
					<text class="yy">应用自定义服务条款、应用自定义服务条款二 </text>
					<text class="bj">并使用本机号码登录</text>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		getStorage
	} from '../../utility/local.js'
	export default {
		data() {
			return {
				userInfo: {}
			};
		},
		onShow() {
			this.userInfo = getStorage()
		},
		methods:{
			//跳转登录页面
			goLogin(){
				uni.navigateTo({
					url:'/pages/login/login'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 0 40rpx 80rpx 40rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		height: 100vh;
		box-sizing: border-box;
		.content-top {
		margin-top: -380rpx;
			.content-top-avatar {
				text-align: center;
				margin-bottom: 20rpx;
				image {
					width: 102rpx;
					height: 102rpx;
					border-radius: 50%;
				}
			}

			.content-top-phone {
				text-align: center;
				display: flex;
				flex-direction: column;
				margin-bottom: 60rpx;
				
				.content-top-phone-top {
					font-size: 56rpx;
					font-weight: 700;
				}

				.content-top-phone-bottom {
					font-size: 24rpx;
					color: #797979;
				}
			}


			.bth {
				width: 100%;
				height: 80rpx;
				background-color: #2596f0;
				border-radius: 40rpx;
				line-height: 80rpx;
				text-align: center;
				color: #fff;
				margin-bottom: 60rpx;
			}


			.handoff {
				text-align: center;
				
				text {
					color: #209bfd;
					font-size: 32rpx;
					font-weight: 600;
				}
			}
		}


		.content-bottom {

			.other {
				text-align: center;
				margin-bottom: 40rpx;

				text {
					font-size: 32rpx;
					color: #797979;
					font-weight: 600;
				}
			}
			
			.agreement {
				 display: flex;
				align-items: center;
				.ty {
					font-size: 24rpx;
					color: #797979;
					font-weight: 600;
				}

				.zg {
					font-size: 24rpx;
					color: #2596f0;
					font-weight: 600;
				}

				.yy {
					font-size: 24rpx;
					color: #2596f0;
					font-weight: 600;
				}

				.bj {
					font-size: 24rpx;
					color: #797979;
					font-weight: 600;
				}

				.and {
					color: #797979;
					font-size: 24rpx;
					font-weight: 600;
				}
			}
		}
	}
</style>